package com.example.ArrayList;

import java.util.ArrayList;
import java.util.Arrays;

public class TestCollection {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3};
        String[] str = {"a", "b", "c"};
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(str));   //[a, b, c]

        ArrayList<String> list1 = new ArrayList<>();
        list1.add("a");
        list1.add("b");
        list1.add("c");
        System.out.println(list1);

        ArrayList<Integer> list2 = new ArrayList<>();
        list2.add(1);
        list2.add(2);
        list2.add(3);
        System.out.println(list2);  //[1, 2, 3]

    }
}
